<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="6" :sm="8">
            <a-form-item label="生产订单号">
              <a-input placeholder="请输入生产订单号" v-model="queryParam.productOrdNo"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="8" >
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->
    
    <!-- 操作按钮区域 -->
    <div class="table-operator">


    </div>

    <!-- table区域-begin -->
    <div>
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">
        <span slot="action" slot-scope="text, record">
          <a @click="handleDetail(record)">查看</a>

          <a-divider type="vertical" />
        </span>

      </a-table>
    </div>

    <zxjEip_2cScbom-modal ref="modalForm" @ok="modalFormOk"></zxjEip_2cScbom-modal>
  </a-card>
</template>

<script>

  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import ZxjEip_2cScbomModal from './modules/ZxjEip2cScbomModal'
  export default {
    name: "ZxjEip2cScbomList",
    mixins:[JeecgListMixin],
    components: {
      ZxjEip_2cScbomModal
    },
    data () {
      return {
        description: 'zxj_eip_2c_scbom管理页面',
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key:'rowIndex',
            width:60,
            align:"center",
            customRender:function (t,r,index) {
              return parseInt(index)+1;
            }
          },
          {
            title:'生产订单号',
            align:"center",
            dataIndex: 'productOrdNo'
          },
          {
            title:'生产订单物料编号',
            align:"center",
            dataIndex: 'productOrdMatNo'
          },
          {
            title:'生产订单物料描述',
            align:"center",
            dataIndex: 'productOrdMatDesc'
          },
          {
            title:'序号',
            align:"center",
            dataIndex: 'serialNo'
          },
          {
            title:'BOM物料编码',
            align:"center",
            dataIndex: 'bomMaterialNo'
          },
          {
            title:'BOM物料描述',
            align:"center",
            dataIndex: 'bomMaterialDesc'
          },
          {
            title:'BOM物料数量',
            align:"center",
            dataIndex: 'bomCount'
          },
          {
            title:'BOM物料单位',
            align:"center",
            dataIndex: 'bomUnit'
          },
          {
            title:'抓取状态',
            align:"center",
            dataIndex: 'ioflag',
            customRender:function (text) {
              return !text?"":(text == 0?'已抓取':'未抓取')
            }
          },
          {
            title:'抓取时间',
            align:"center",
            dataIndex: 'updateTime'
          },
          {
            title: '操作',
            dataIndex: 'action',
            align:"center",
            scopedSlots: { customRender: 'action' },
          }
        ],
        url: {
          list: "/apis/zxjEip2cScbom/list",
        },
        dictOptions:{
        } 
      }
    },
    computed: {
      importExcelUrl: function(){
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
      }
    },
    methods: {
      initDictConfig(){
      }
       
    }
  }
</script>
<style scoped>
  /*@import '~@assets/less/common.less'*/
</style>